package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface SellMapper {
    void saveSaleList(@Param("saleList") SaleList saleList);

    SaleList getSaleList(@Param("saleNumber")String saleNumber);

    void saveSaleListGoods(@Param("list")List<SaleListGoods> saleListGoods);

    void saveCustomerReturnList(@Param("customerReturnList") CustomerReturnList customerReturnList);

    CustomerReturnList getSCustomerReturnList(@Param("returnNumber") String returnNumber);

    void saveCustomerReturnListGoods(@Param("list") List<CustomerReturnListGoods> list);

    List<SaleList> getSaleListGoodsList(@Param("saleNumber") String saleNumber, @Param("customerId")Integer customerId, @Param("state")Integer state, @Param("sTime")String sTime, @Param("eTime")String eTime);

    List<SaleListGoods> saleGoodsList(Integer saleListId);

    void delSaleListGoods(Integer saleListId);

    void delSaleList(Integer saleListId);

    List<CustomerReturnList> getCustomerReturnListGoodsList(@Param("returnNumber") String returnNumber, @Param("customerId")Integer customerId, @Param("state")Integer state, @Param("sTime")String sTime, @Param("eTime")String eTime);

    List<CustomerReturnListGoods> customerReturnListGoodsList(Integer customerReturnListId);

    void delCustomerReturnList(Integer customerReturnListId);

    void delCustomerReturnGoods(Integer customerReturnListId);

    void updateState(Integer saleListId);

    List<Map> count(@Param("sTime") String sTime, @Param("eTime")String eTime, @Param("goodsTypeId")Integer goodsTypeId, @Param("codeOrName")String codeOrName);

    List<AVGPojo> getSaleDataByDay(@Param("sTime") String sTime, @Param("eTime") String eTime);

    List<AVGPojo> getPurchaseDataByDay(@Param("sTime") String sTime, @Param("eTime")String eTime);

    List<AVGPojo> getSaleDataByMonth(@Param("sTime")String sTime,  @Param("eTime")String eTime);

    List<AVGPojo> getPurchaseDataByMonth(@Param("sTime")String sTime,  @Param("eTime")String eTime);
}
